

#include <testsensorbi/TestSensorBiE.h>





	// ******************* CONSTRUCTOR ************************************



TestSensorBi::TestSensorBi(const char * const roomname,TEDROOMComponentID id, unsigned int roomNumMaxMens, TEDROOMPriority roomtaskPrio, TEDROOMStackSizeType roomStack, CEDROOMMemory *pActorMemory ) : 
		CEDROOMComponent(roomname,id,EDROOMprioMINIMUM+1,3,roomNumMaxMens,roomtaskPrio,roomStack, pActorMemory )




		// ***************	Estado Top *****************

		,edroomTopState(*this,pActorMemory)


{


}


	//***************	METODOS PUBLICOS  ********************************



		//**********           CONFIGURACION               ************


int TestSensorBi::EDROOMConfig() {




 return 0; }



		//**********           START               ************


int TestSensorBi::EDROOMStart() {



		//****************** INICIO DEL PROPIO ACTOR **********************

	CEDROOMComponent::EDROOMStart(); 	// Llamada a la funcion Start de la clase Actor

return 0;}


	// ***************	METODOS PROTEGIDOS *******************************



		//**********        COMPORTAMIENTO           ************



void TestSensorBi::EDROOMBehaviour() {

	edroomTopState.EDROOMBehaviour();

}




		//**********        ACTORTERMINADO           ************


	#ifdef _EDROOM_SYSTEM_CLOSE

bool_t TestSensorBi::EDROOMIsComponentFinished() {


	return ( SensorBi.EDROOMIsComponentFinished() && Ssi.EDROOMIsComponentFinished() && CEDROOMComponent::EDROOMIsComponentFinished());

}


	#endif

	//**************      FUNCIONES DE TRATAMIENTO DE SE�ALES   *****************

/*
int TestSensorBi::EDROOM_Union3_1( int SenalOut){

	int SenalIn;

	switch(SenalOut){

		default: SenalIn=-1; break;

	}


	return SenalIn;

}


int TestSensorBi::EDROOM_Union3_2( int SenalOut){

	int SenalIn;

	switch(SenalOut){

		case( TestSensorBi::SToListening):	 SenalIn=CASSI::SToListening; break;

		case( TestSensorBi::SToStandBy):	 SenalIn=CASSI::SToStandBy; break;

		default: SenalIn=-1; break;

	}


	return SenalIn;

}


int TestSensorBi::EDROOM_Union2_1( int SenalOut){

	int SenalIn;

	switch(SenalOut){

		case( CASSI::SNextSensorSsiDataFrame):	 SenalIn=TestSensorBi::SNextSensorSsiDataFrame; break;

		case( CASSI::SDataFrame):	 SenalIn=TestSensorBi::SDataFrame; break;

		case( CASSI::SSignalFrame):	 SenalIn=TestSensorBi::SSignalFrame; break;

		default: SenalIn=-1; break;

	}


	return SenalIn;

}


int TestSensorBi::EDROOM_Union2_2( int SenalOut){

	int SenalIn;

	switch(SenalOut){

		case( TestSensorBi::SNextSensorSsiDataFrame):	 SenalIn=CASSI::SNextSensorSsiDataFrame; break;

		case( TestSensorBi::SDataFrame):	 SenalIn=CASSI::SDataFrame; break;

		case( TestSensorBi::SSignalFrame):	 SenalIn=CASSI::SSignalFrame; break;

		default: SenalIn=-1; break;

	}


	return SenalIn;

}


int TestSensorBi::EDROOM_Union_1( int SenalOut){

	int SenalIn;

	switch(SenalOut){

		case( CASensorBi::SDataFrame):	 SenalIn=CASSI::SDataFrame; break;

		case( CASensorBi::SSignalFrame):	 SenalIn=CASSI::SSignalFrame; break;

		default: SenalIn=-1; break;

	}


	return SenalIn;

}


int TestSensorBi::EDROOM_Union_2( int SenalOut){

	int SenalIn;

	switch(SenalOut){

		case( CASSI::SDataFrame):	 SenalIn=CASensorBi::SDataFrame; break;

		case( CASSI::SSignalFrame):	 SenalIn=CASensorBi::SSignalFrame; break;

		default: SenalIn=-1; break;

	}


	return SenalIn;

}

*/

	// ***************	EDROOM Memory ******************************

void TestSensorBi::CEDROOMMemory::SetMemory(TEDROOMUInt32 numMessages_, CEDROOMMessage * MessagesMem_, bool_t * MessagesMemMarks_, CEDROOMQueue::CQueueNode * QueueNodesMem_, bool_t * QueueNodesMemMarks_){
		CEDROOMComponentMemory::SetMemory( numMessages_,MessagesMem_, MessagesMemMarks_, QueueNodesMem_, QueueNodesMemMarks_, QueueHeads);

//	SensorBiMemory.SetMemory(10,SensorBiMessages, &	SensorBiMessagesMarks[0],SensorBiQueueNodes,&SensorBiQueueNodesMarks[0]);

//	SsiMemory.SetMemory(10,SsiMessages, &	SsiMessagesMarks[0],SsiQueueNodes,&SsiQueueNodesMarks[0]);


}

